package com.linkage.jz.bankruptcy.bean.Vote;

import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 我的表决
 */
public class ProVoteMyVote implements Serializable {

    private String id;
    private String bankruptcyProjectId;
    private String voteId;
    private String creditorId;
    private double confirmedMoney;
    private double voteMoney;
    private String groupId;
    private String groupName;
    private boolean meeting;
    private long meetingTime;
    private boolean vote;//True已表决false未表决
    private long voteTime;
    private int voteOpinion;//0反对1赞成
    private String supplementOpinion;
    private String meetingNumber;
    private boolean allowChange;


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getBankruptcyProjectId() {
        return bankruptcyProjectId;
    }

    public void setBankruptcyProjectId(String bankruptcyProjectId) {
        this.bankruptcyProjectId = bankruptcyProjectId;
    }

    public String getVoteId() {
        return voteId;
    }

    public void setVoteId(String voteId) {
        this.voteId = voteId;
    }

    public String getCreditorId() {
        return creditorId;
    }

    public void setCreditorId(String creditorId) {
        this.creditorId = creditorId;
    }

    public double getConfirmedMoney() {
        return confirmedMoney;
    }

    public void setConfirmedMoney(double confirmedMoney) {
        this.confirmedMoney = confirmedMoney;
    }

    public double getVoteMoney() {
        return voteMoney;
    }

    public void setVoteMoney(double voteMoney) {
        this.voteMoney = voteMoney;
    }

    public String getGroupId() {
        return groupId;
    }

    public void setGroupId(String groupId) {
        this.groupId = groupId;
    }

    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    public boolean isMeeting() {
        return meeting;
    }

    public void setMeeting(boolean meeting) {
        this.meeting = meeting;
    }

    public long getMeetingTime() {
        return meetingTime;
    }

    public void setMeetingTime(long meetingTime) {
        this.meetingTime = meetingTime;
    }

    public boolean isVote() {
        return vote;
    }

    public void setVote(boolean vote) {
        this.vote = vote;
    }

    public long getVoteTime() {
        return voteTime;
    }

    public void setVoteTime(long voteTime) {
        this.voteTime = voteTime;
    }

    public int getVoteOpinion() {
        return voteOpinion;
    }

    public void setVoteOpinion(int voteOpinion) {
        this.voteOpinion = voteOpinion;
    }

    public String getSupplementOpinion() {
        return supplementOpinion;
    }

    public void setSupplementOpinion(String supplementOpinion) {
        this.supplementOpinion = supplementOpinion;
    }

    public String getMeetingNumber() {
        return meetingNumber;
    }

    public void setMeetingNumber(String meetingNumber) {
        this.meetingNumber = meetingNumber;
    }

    public boolean isAllowChange() {
        return allowChange;
    }

    public void setAllowChange(boolean allowChange) {
        this.allowChange = allowChange;
    }

    public static List<ProVoteMyVote> parse(JsonArray arr) {
        List<ProVoteMyVote> list = new ArrayList<>();
        for (int i = 0; i < arr.size(); i++) {
            list.add(parse(arr.get(i).getAsJsonObject()));
        }
        return list;
    }

    public static ProVoteMyVote parse(JsonObject obj) {
        ProVoteMyVote bean = new Gson().fromJson(obj, ProVoteMyVote.class);
        return bean;
    }
}
